#-- coding=utf-8 ---*---
# __author__ = 'wenke1'

readflag=0
if readflag==1:
    print "编码isjgb"
    path='wenke.sh'
    # rawfile 就是一个文件对象，或者文件描述符
    rawfile = open(path,mode='r')
    print rawfile.read()
    rawfile.close()
    #open 二进制文件\gbk文件
    pdfpath='wenke.pdf'
    gbkfile='gbktest.txt'
    rawfile1 = open(gbkfile,mode='r')
    print rawfile1.read().decode(encoding='gbk')
    rawfile1.close()

#write pactise
if readflag==0:
    writefile = 'writetemp'
    fw=open(writefile,'w')
    fw.write('我是谁！are you ok?')
    fw.close()